package com.ys.bean.factory;

import com.ys.exception.BeansException;

/**
 * <p>@description: IOC底层实现beanFacoty </p>
 *
 * @projectName: Spring-Mini
 * @className:
 * @author: yangshuang
 * @date: 2016/12/11 16:58
 */
public interface BeanFactory {
    /**
     * 通过beanName获取bean实例
     *
     * @param beanName
     * @param <T>
     * @return
     */
    <T extends Object> T getBeanByName(String beanName) throws BeansException;

    /**
     * 根据class类型获取bean实例；
     *
     * @param requiredType
     * @param <T>
     * @return
     */
    <T extends Object> T getBeanByType(Class<T> requiredType) throws BeansException;

}
